@import "./../theme";
@import "./../var";

.organization-selector {
  width: 100%;

  .organization-selector-container {
    .organization-selector-wrapper {
      padding-left: 1.5rem;
    }
  }
}

.organization-selector-dialog {
  .organization-tree {
    .el-tree-node {
      .el-tree-node__content {
        height: 2rem !important;

        &:hover {
          background-color: $borderColorLighter;
        }

        .el-checkbox.is-disabled {
          display: none;
        }
      }
    }
  }
  .custom-tree-node {
    width: calc(100% - 24px);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    min-width: 0;

    .custom-tree-node-icon {
      width: 1.3rem;
      color: $colorTextSecondary;
    }

    .custom-tree-node-name {
      @include text-ellipsis;
      width: 100%;
      flex: 1;
      min-width: 0;

      small {
        color: $colorTextSecondary;
        margin-left: 0.3rem;
      }
    }
  }

  .el-dialog__body {
    padding: 0.5rem 0.5rem 0 0.5rem !important;
    height: 500px;
    display: flex;
  }

  .el-dialog__footer {
    padding: 1rem;
  }

  .member-org-detail-title-bar {
    padding: 0.4rem 0.5rem;
    align-items: center;
    font-size: $fontSizeRegular;
    border-bottom: $borderColorLighter 1px solid;
    height: auto;

    .member-title-search {
      margin: 0.3rem 0;
    }

    .title-bar-bread {
      margin-left: 0.2rem;
      flex: 1;
      align-items: center;
      display: flex;

      .bread-link {
        font-size: $fontSizeSmall;
        color: $colorTextSecondary;
        max-width: 8rem;
        overflow: hidden;
        padding-left: 0.2rem;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: top;
        align-items: center;
        display: flex;

        i {
          color: $colorTextSecondary;
          display: inline-block;
          font-size: $fontSizeRegular;
          padding-right: 0.2rem;
        }

        cursor: pointer;

        &:last-of-type {
          color: $colorPrimaryActive;
          cursor: inherit;
        }
      }
    }
  }

  .tree-select-section-left {
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid $borderColorLight;
    min-width: 0;
  }

  .tree-select-section-right {
    height: 100%;
    flex: 1;
    display: flex;
    border: 1px solid $borderColorLight;
    border-left-color: transparent;
    min-width: 0;

    & > div {
      flex: 1;
    }
  }

  .b-scroll {
    overflow-y: auto;
  }

  .member-org-detail-list-container {
    background: $bgColorPrimary;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }

  .member-org-detail-list-item-container {
    margin: 0 !important;
    list-style: none;
  }
}

.member-org-detail-item {
  vertical-align: top;
  cursor: pointer;
  padding: 0 0 0 1rem;
  color: $colorTextPrimary;
  display: flex;
  align-items: center;
  height: 2.2rem;
  border-bottom: 1px solid $borderColorLighter;

  .member-org-manage-check {
    margin-bottom: 0.1rem;
    margin-right: 0.4rem !important;
  }

  .member-org-detail-item-wrapper {
    display: flex;
    height: 2rem;
    align-items: center;
    overflow: hidden;
    flex: 1;
  }

  .member-org-detail-icon {
    min-width: 24px;
    text-align: center;
    line-height: 2rem;
    margin: 0.2rem 0;
    cursor: pointer;

    i {
      font-size: $fontSizeRegular;
      color: $colorTextInfo;
    }

  }

  .member-org-detail-title {
    font-size: $fontSizeRegular;
    min-width: 4.5rem;
    margin-left: 0.2rem;
    @include text-ellipsis;

    & > small {
      font-size: $fontSizeSmall;
      margin-left: 0.3rem;
      color: $colorTextSecondary;
      text-transform: capitalize;
    }
  }

  .member-org-spacing {
    flex: 1;
  }

  &:hover {
    background: $borderColorLighter;
  }

  &:active {
    background: $tableHeaderBgColor;
  }

  .item-org {
    .member-org-detail-icon {
      line-height: 1.5rem !important;
    }
  }

  .member-org-detail-append {
    margin-right: 0.3rem;
    color: $colorTextSecondary;
    font-size: $fontSizeRegular;
  }
}

.print-read-mode {
  .organization-selector-container {
    background: transparent !important;
    border-color: transparent;
  }

  .organization-selector-item {
    filter: grayscale(100%);
  }

  .organization-selector-placeholder {
    display: none;
  }
}

.organization-selector-mobile {
  overflow: hidden !important;

  .organization-selector-dialog {
    width: 100vw !important;
    height: 100vh !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
  }

  .tree-select-section-right {
    display: none;
  }
}
